<!DOCTYPE html>
<html>
{include file="head.html"}
<body>
<div class="header" >
    <a  class="left-btn pointer" href="{$apptgyuan}?m=stat_shoporder_day"><span class="iconfont icon-back"></span></a>
    <div class="title">每日收入</div>    
  </div>
  
  <div class="tabs-border">
    	<div class="item active"><a href="{$apptgyuan}?m=stat_shoporder_day&a=chart">每日收入</a></div>
        <div class="item"><a href="{$apptgyuan}?m=stat_shoporder_week&a=chart">每周收入</a></div>
        <div class="item"><a href="{$apptgyuan}?m=stat_shoporder_month&a=chart">每月收入</a></div>
    </div>
  
 	 <div style="width:90%; max-width:640px; margin:0 auto;"><canvas id="canvas" height="450" width="600" style="width:100%" ></canvas></div>
  
  {include file="footer.html"} </div>
  <script src="/plugin/chart/Chart.min.js"></script>
  <script>
		var randomScalingFactor = function(){ return Math.round(Math.random()*100)};
		var lineChartData = {
			labels : [{$labels}],
			datasets : [
				{
					label: "My First dataset",
					fillColor : "rgba(220,220,220,0.2)",
					strokeColor : "rgba(220,220,220,1)",
					pointColor : "rgba(220,220,220,1)",
					pointStrokeColor : "#fff",
					pointHighlightFill : "#fff",
					pointHighlightStroke : "rgba(220,220,220,1)",
					data : [{$moneys}]
				} 
			]

		}

	window.onload = function(){
		var ctx = document.getElementById("canvas").getContext("2d");
		window.myLine = new Chart(ctx).Line(lineChartData, {
			responsive: true
		});
	}


	</script>
</body>
</html>